package org.springframework.learn.beans.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.core.annotation.Order;

@Configuration
@ComponentScan({"org.springframework.learn.beans"})
public class MyComponentScan {

	/**
	 * 在解析处理外部类MyComponentScan时才会去处理内部类（先把内部类解析处理完），但内部类在此时不会注册到spring容器中，InnerClass的包装类ConfigurationClass#Set<ConfigurationClass> importedBy会保存外部类MyComponentScan。最后由ConfigurationClassBeanDefinitionReader#loadBeanDefinitions注册
	 *
	 */
//	@Import({MyComponentScan.class})这个注解会被解析，导致循环依赖异常
	@ComponentScan({"org.springframework.learn.beans"})
    @Configuration
    @Order(90)
    public class InnerClass{

    }

}
